﻿@model Echegoyen.Models.Material

@{
    ViewBag.Title = "Buscar";
}

<h2>Buscar</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()

    <fieldset>
        <legend>Material</legend>

        <div class="editor-label">
            @Html.Raw("<h4>El título contiene</h4>")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Titulo)
            @Html.ValidationMessageFor(model => model.Titulo)
        </div>

        <div class="editor-label">
            @Html.Raw("<h4>Editorial</h4>")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.EditorialId,
                (IEnumerable<SelectListItem>)@ViewBag.Editoriales)
     
        </div>

        <div class="editor-label">
             @Html.Raw("<h4>Tema</h4>")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.TemaId, (IEnumerable<SelectListItem>)ViewBag.Temas)
     
        </div>
        
        <div class="editor-label">
             @Html.Raw("<h4>Autor</h4>")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.AutoresId, (IEnumerable<SelectListItem>)ViewBag.Autores)
       
        </div>    

        <div class="editor-label">
            @Html.Raw("<h4>Tipo de Material</h4>")
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.TipoMaterialId, 
                 (IEnumerable<SelectListItem>)@ViewBag.TiposMaterial)
       
        </div>


        <p>
            <input type="submit" value="Buscar" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
